texture: Change download vfunc
authorBenjamin Otte <otte@redhat.com>
Mon, 12 Mar 2018 16:17:30 +0000 (17:17 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 12 Mar 2018 16:21:45 +0000 (17:21 +0100)
commit13d943f76353367724d5f6e9d9f5174d73f09a2e
tree3ef803f3ca8597b0ed2e3df9116fc99f01f6a896
parente5813b3ae76c7a75ed42a932cf3b93a15596ff44
texture: Change download vfunc

A problem with textures is that they can become too big for GPU memory,
which would require tiling. But for tiling we only need to download
the pixels needed by the tile.

Similarly, there might be interest to not upload full textures if a
renderer knows it only needs a small part.

Both of these methods require the ability to specify an area of the
texture to be downloaded. So change the download vfunc to include
this parameter now before we add even more textures later.

A private gdk_texture_download_area() function has also been added, but
nobody is using it yet.
gdk/gdkgltexture.c
gdk/gdkmemorytexture.c
gdk/gdktexture.c
gdk/gdktextureprivate.h